<%--
  Created by IntelliJ IDEA.
  User: zyxna
  Date: 2020/8/25
  Time: 23:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page isELIgnored="false" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="resources/css/table.css" />
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
</head>
<body>
<div id="dv">
    <h3>&nbsp;流水单管理</h3>
    </td>

    <div>
        <div style="display: inline-block;">
            <input type="text" id="insearch" placeholder="请输入要查询的流水单" />
            <img src="resources/img/seach.png" onclick="toSeach()" style="height: 30px;width: 30px;vertical-align: middle;">
        </div>


    </div>

    <div class="fixedTable">
        <table cellspacing="0" class="myTable" id="nav_tab" align="center">
            <thead>
            <tr id="tr3" bgcolor="#1976d5" >
                <th>流水ID</th>
                <th>商品ID</th>
                <th>商品名字</th>
                <th>销售时间</th>
                <th>销售数量</th>
                <th>应付金额</th>
                <th>实付金额</th>
            </thead>
            <tbody class="grid" align="center">
            <c:forEach items="${lists}" var="item" varStatus="status">
                <tr>
                    <td>${item.laundryId }</td>
                    <td>${item.merchId }</td>
                    <td>${item.merchname }</td>
                    <td>${item.salestime }</td>
                    <td>${item.salessum }</td>
                    <td>${item.shouldmoney }</td>
                    <td>${item.realitymoney }</td>
                </tr>
            </c:forEach>

            </tr>


            </tbody>
        </table>
    </div>
</div>
</body>
</html>
<script>
    //搜索
    function toSeach() {
        var seachVul=document.getElementById("insearch").value;
        console.log(seachVul)
        if(seachVul=="ALL"){
            window.location.href="saledServlet?method=showLaundryList";
        }else{
            window.location.href="saledServlet?method=LaundrySearch&laundryId="+seachVul;
        }
    }
</script>